package com.xique.door.bean.vo.advert;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * @author: caogq
 * @Date: 2022/1/21 14:15
 * @Description:
 */
@Data
public class DoorAdvertVo implements Comparable<DoorAdvertVo> {
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 刊位 */
    private Long location;

    /** 名称 */
    private String name;

    /** 地址 */
    private String url;

    /** 文件类型（1图片2视频） */
    private Integer fileType;

    /** 播放顺序 */
    private Integer playOrder;

    /** 展示开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date startTime;

    /** 展示结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endTime;

    /** 图片广告停留时长 */
    private Integer runTime;


    /** 状态 */
    private String status;

    /** 下发状态 */
    private Integer commandStatus;

    /** 下发记录 */
    private List<DoorAdvertCommandVo> commandVos;

    private String updateBy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /** 投放方式 */
    private String onlineType;

    @Override
    public int compareTo(DoorAdvertVo o) {
        return this.playOrder.compareTo(o.getPlayOrder());
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
}
